package me.zk.practice1.s;

/**
 * @author zhangkai
 * @date 2023/7/7 17:38
 */
public class LS876 {
    public ListNode middleNode(ListNode head) {
        ListNode slow = head,fast = head;

        while (fast!=null && fast.next!=null) {
            fast = fast.next.next;
            slow = slow.next;
        }
        return slow;
    }
}
